#!/bin/bash
if(test -L $0) then auxlink=`ls -l $0 | sed 's/^[^>]*-> //g'`; M_HOME=`dirname $auxlink`/; else M_HOME=`dirname $0`/; fi; cd $M_HOME
. ../before || exit 1
sb2 ./autogen.sh
sb2 ac_cv_func_malloc_0_nonnull=yes CFLAGS=-DUSE_INPUT_API ./configure \
  --prefix=/usr --sysconfdir=/etc --enable-shared --disable-ucb1x00 \
  --disable-corgi --disable-collie --disable-h3600 --disable-mk712 \
  --disable-arctic2 --enable-input
sed -i 's/^# \(module_raw input\)$/\1/' etc/ts.conf
sed -i 's/^ECHO="echo"/echo="echo"/' libtool # funny bug.
sb2 make
sb2 make DESTDIR=$ROOTFS/ install
touch $ROOTFS/.`basename $0`
